.home-container {
  width: 100%;
  min-height: 100vh;
  background-color: #f5f5f5;
  overflow-x: hidden;
}

/* 骨架屏容器样式 */
.oa-skeleton {
  padding: 20px;
}

.home-header {
  width: 100%;
  height: 476px;
  background: url('@/assets/homeOther/home_bg.png') no-repeat center top;
  background-size: 750px 476px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 6vw;
  box-sizing: border-box;

  .header-content {
    color: white;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 99px; //  补偿function-modules的负margin
    box-shadow: 0px 4px 15px 0px rgba(0, 0, 0, 0.05);
    .header-logo {
      width: 50px;
      height: 50px;
      margin-bottom: 0;
    }
    
    // 标题 + 右侧消息图标容器
    .title-row {
      display: flex;
      align-items: center;
      justify-content: space-between; // 图标靠右
     

      // 保持原来的位置偏移（原本设置在 .title 上）
      margin-top: -50px;
      margin-left: 60px;
      // 让容器占满可用宽度，便于将图标推到最右侧
      width: calc(100% - 60px); // 与左侧偏移相配合

    }
    // 右侧消息图标样式
    .message-icon {
      width: 56px;
      height: 56px;
      object-fit: contain;
      cursor: pointer;
      filter: drop-shadow(0 0 4px rgba(41, 113, 221, 0.35));
      transition: transform 0.15s ease-in-out;
      &:active { transform: scale(0.92); }
    }
    
    .title {
      // width: 324px;
      height: 54px;
      font-family: 'Source Han Sans CN', 'Source Han Sans CN';
      font-weight: 500;
      font-size: 36px;
      color: #FFFFFF;
      text-shadow: 0px 0px 4px #2971DD;
      text-align: left;
      font-style: normal;
      text-transform: none;
      line-height: 54px;
      margin-bottom: 0;
      // 原有偏移移动到 .title-row 上，这里清零避免影响同行布局
      margin-top: 0;
      margin-left: 0;
      flex: 1; // 占据剩余空间，推挤图标到右侧
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    
    .subtitle {
      // width: 90px;
      height: 45px;
      font-family: 'Source Han Sans CN', 'Source Han Sans CN';
      font-weight: 500;
      font-size: 30px;
      color: #FFFFFF;
      text-shadow: 0px 0px 4px #2971DD;
      text-align: left;
      font-style: normal;
      text-transform: none;
      line-height: 45px;
      margin-top: 65px;
    }
  }
}

.function-modules {
  display: flex;
  justify-content: space-between;
  padding: 49px 20px 53px 20px;
  background: white;
  margin: -175px 20px 0 20px;
  border-radius: 20px 20px 20px 20px;
  position: relative;
  z-index: 2;
  
  .module-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex: 1;
    
    &:active {
      transform: scale(0.95);
    }
    
    img {
      width: 90px;
      height: 90px;
      margin-bottom: 10px;
      object-fit: contain;
    }
    
    span {
      // width: 100px;
      // height: 35px;
      font-family: 'Source Han Sans CN', 'Source Han Sans CN';
      font-weight: 400;
      font-size: 24px;
      color: #333333;
      letter-spacing: 1px;
      text-align: center;
      font-style: normal;
      text-transform: none;
      line-height: 35px;
    }
  }
}

.oa-section {
  background: white;
  margin: 20px 20px 0 20px;
  border-radius: 12px;
  padding: 20px;
  padding-right: 0;
  box-shadow: 0px 4px 15px 0px rgba(0, 0, 0, 0.05);
  
  .section-header {
    display: flex;
    align-items: center;
    justify-content: left;
    margin-bottom: 5vw;
    
    .section-title {
      display: flex;
      align-items: center;
      
      .oa-icon {
        width: 36px;
        height: 36px;
        margin-right: 17px;
        object-fit: contain;
      }
      
      span {
        // width: 95px;
        // height: 42px;
        font-family: 'Source Han Sans CN', 'Source Han Sans CN';
        font-weight: 500;
        font-size: 28px;
        color: #333333;
        text-align: left;
        font-style: normal;
        text-transform: none;
      }
    }
    
    .arrow-icon {
      color: #999;
      font-size: 38px;
      margin-left: 10px;
    }
 
  }
  
  .statistics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding-right: 40px;
    
    .stat-item {
      width: 320px;
      box-sizing: border-box;
      background: #F5F7FA;
      border-radius: 10px;
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      padding-left: 20px;
      background: #F5F7FA;
      
      .stat-number {
        // width: 29px;
        // height: 75px;
        font-family: 'Source Han Sans CN', 'Source Han Sans CN';
        font-weight: 500;
        font-size: 50px;
        color: #171A1D;
        letter-spacing: 2px;
        text-align: center;
        font-style: normal;
        text-transform: none;
        // line-height: 75px;
        margin-bottom: 0;
        padding-left: 19px;
        padding-top: 12px;
      }
      
      .stat-label {
        // width: 69px;
        // height: 32px;
        font-family: 'Source Han Sans CN', 'Source Han Sans CN';
        font-weight: 400;
        font-size: 22px;
        color: #666666;
        letter-spacing: 1px;
        text-align: left;
        font-style: normal;
        text-transform: none;
        line-height: 32px;
        padding-bottom: 10px;
        padding-left: 19px;
      }
      
      .stat-bg-icon {
        position: absolute;
        object-fit: contain;
        right: 5px;
        top: 50%;
        transform: translateY(-50%);
        width: 100px;
        height: 100px;
      }
      
    
    }
  }
}

.todo-section {
  background: white;
  margin: 20px;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0px 4px 15px 0px rgba(0, 0, 0, 0.05);
  
  .section-header {
    display: flex;
    align-items: center;
    justify-content: left;
    margin-bottom: 4vw;
    
    .section-title {
      display: flex;
      align-items: center;
      
      .todo-icon {
        width: 36px;
        height: 36px;
        margin-right: 17px;
        object-fit: contain;
      }
      
      span {
        // width: 56px;
        height: 42px;
        font-family: 'Source Han Sans CN', 'Source Han Sans CN';
        font-weight: 500;
        font-size: 28px;
        color: #333333;
        text-align: left;
        font-style: normal;
        text-transform: none;
      }
    }
    
    .todo-count {
      width: 50px;
      height: 32px;
      border-radius: 30px;
      background: #FF5219;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #FFFFFF;
      font-size: 22px;
      margin-left: 10px;
      // 数字样式
      span {
        width: 44px;
        height: 48px;
        font-family: Source Han Sans CN, Source Han Sans CN;
        font-weight: 500;
        font-size: 22px;
        color: #FFFFFF;
        text-align: left;
        font-style: normal;
        text-transform: none;
        display: flex;
        align-items: center;
        justify-content: center;
      }
    }
    
    .arrow-icon {
      color: #999;
      font-size: 38px;
      margin-left: 10px;
    }
  }
  
  .todo-list {
    .todo-item {
      display: flex;
      flex-direction: column;
      // padding: 4vw;
      // background: #FAFAFA;
      border-radius: 12px;
      margin-bottom: 3vw;
      // border: 1px solid #F0F0F0;
      
      &:last-child {
        margin-bottom: 0;
      }
      
      .todo-content {
        flex: 1;
        margin-bottom: 3vw;
        
        .todo-header {
          display: flex;
          align-items: center;
          justify-content: space-between;
          margin-bottom: 2vw;
          
          .todo-type {
            background: #E8F4FD;
            color: #2D67B0;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 22px;
            font-weight: 500;
          }
          
          .todo-id {
            color: #999;
            font-size: 22px;
          }
        }
        
        .todo-title {
          height: 45px;
          font-family: Source Han Sans CN, Source Han Sans CN;
          font-weight: bold;
          font-size: 30px;
          color: #171A1D;
          letter-spacing: 1px;
          text-align: left;
          font-style: normal;
          text-transform: none;
          margin-bottom: 2vw;
          line-height: 45px;
          // 超出容器显示省略号，不换行
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
        
        .todo-details {
          margin-bottom: 3vw;
          
          .detail-item {
            display: flex;
            align-items: center;
            margin-bottom: 1.5vw;
            
            .label {
              min-width: 120px;
              font-size: 24px;
              color: #666;
              margin-right: 2vw;
            }
            
            .value {
              font-size: 24px;
              color: #333;
              flex: 1;
              
              &.amount {
                color: #FF6B35;
                font-weight: 600;
              }
            }
          }
        }
        
        .todo-meta {
          padding-top: 2vw;
          border-top: 1px solid #F0F0F0;
          
          .meta-item {
            display: flex;
            align-items: center;
            margin-bottom: 1vw;
            
            &:last-child {
              margin-bottom: 0;
            }
            
            .label {
              min-width: 120px;
              font-size: 22px;
              color: #999;
              margin-right: 2vw;
            }
            
            .value {
              font-size: 22px;
              color: #666;
              flex: 1;
            }
          }
        }
        
        .todo-info {
          display: flex;
          align-items: center;
          margin-bottom: 1.5vw;
          
          .todo-type {
            width: 172px;
            height: 38px;
            font-family: Source Han Sans CN, Source Han Sans CN;
            font-weight: 400;
            font-size: 26px;
            color: #666666;
            letter-spacing: 1px;
            text-align: left;
            font-style: normal;
            margin-right: 4vw;
            line-height: 38px;
            // 超出容器显示省略号，不换行
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
          }
          
          .todo-time {
            width: 172px;
            height: 38px;
            font-family: Source Han Sans CN, Source Han Sans CN;
            font-weight: 400;
            font-size: 26px;
            color: #666666;
            letter-spacing: 1px;
            text-align: left;
            font-style: normal;
            line-height: 38px;
            // 超出容器显示省略号，不换行
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
          }
        }
        
        .todo-deadline {
          font-size: 3.2vw;
          color: #999;
        }
      }
      
      .todo-actions {
        display: flex;
        width: 100%;
        
        .reject-btn {
          width: 327px;
          height: 75px;
          font-family: PingFang SC, PingFang SC;
          font-weight: bold;
          font-size: 36px;
          color: #2D67B0;
          text-align: center;
          font-style: normal;
          text-transform: none;
          background: #FFFFFF;
          border-top: 1px solid #E0E0E0;
          border-bottom: none;
          border-left: none;
          border-right: 1px solid #E0E0E0;
          border-radius: 0;
          flex: 1;
          padding: 25px 0 25px 0;
          display: flex;
          align-items: flex-start;
          justify-content: center;
          
          &:active {
            // background: #F5F5F5;
          }
        }
        
        .approve-btn {
          width: 327px;
          height: 75px;
          font-family: PingFang SC, PingFang SC;
          font-weight: bold;
          font-size: 36px;
          color: #2D67B0;
          text-align: center;
          font-style: normal;
          text-transform: none;
          background: #FFFFFF;
          border-top: 1px solid #E0E0E0;
          border-bottom: none;
          border-left: none;
          border-right: none;
          border-radius: 0;
          flex: 1;
          padding: 25px 0 25px 0;
          display: flex;
          align-items: flex-start;
          justify-content: center;
          &:active {
            background: #F5F5F5;
          }
        }
      }
    }
  }
  
  .empty-state {
    text-align: center;
    // padding: 48px 0 35px 0;
    
    .empty-icon {
      margin-bottom: 35px;
      display: flex;
      justify-content: center;
      
      img {
        width: 200px;
        height: 200px;
      }
    }
    
    .empty-text {
      font-family: 'Source Han Sans CN', 'Source Han Sans CN';
      font-weight: 400;
      font-size: 26px;
      color: #666666;
      letter-spacing: 1px;
      text-align: center;
      font-style: normal;
      text-transform: none;
      margin: 0 auto;
      border-top: 1px solid #E5E5E5;
      padding-top: 26px;
      padding-bottom: 35px;
    }
  }
}

.demo-controls {
  position: fixed;
  bottom: 25vw;
  right: 6vw;
  z-index: 999;
  
  .toggle-btn {
    background: #FF6B6B;
    border: none;
    font-size: 3.2vw;
    padding: 2vw 4vw;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    &:active {
      background: #FF5252;
      transform: scale(0.95);
    }
  }
}

.ai-assistant {
  position: fixed;
  bottom: 18px;
  right: 6vw;
  z-index: 1000;
  
  .ai-button {
    width: 130px;
    height: 130px;

    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
  img{
    width: 130px;
    height: 130px;
  }
  
  }
}
:deep(.van-badge--top-right) {
  transform: translate(0, 0)!important;
  margin-left: 15px;
  width: 60px;

  
  .van-badge__wrapper {
    width: 60px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
  }
}
// // 响应式适配
// @media (max-width: 375px) {
//   .function-modules {
//     padding: 5vw 6vw 3vw;
    
//     .module-item {
//       img {
//         width: 10vw;
//         height: 10vw;
//       }
      
//       span {
//         font-size: 3vw;
//       }
//     }
//   }
  
//   .statistics-grid {
//     gap: 3vw;
    
//     .stat-item {
//       padding: 3vw;
      
//       .stat-number {
//         font-size: 7vw;
//       }
      
//       .stat-label {
//         font-size: 3vw;
//       }
//     }
//   }
// }

// @media (min-width: 414px) {
//   .home-header {
//     .header-content {
//       .title {
//         font-size: 22px;
//       }
      
//       .subtitle {
//         font-size: 16px;
//       }
//     }
//   }
  
//   .function-modules {
//     .module-item {
//       img {
//         width: 48px;
//         height: 48px;
//       }
      
//       span {
//         font-size: 14px;
//       }
//     }
//   }
  
//   .statistics-grid {
//     .stat-item {
//       .stat-number {
//         font-size: 32px;
//       }
      
//       .stat-label {
//         font-size: 14px;
//       }
//     }
//   }
  
//   .ai-assistant {
//     .ai-button {
//       width: 56px;
//       height: 56px;
      
//       .ai-text {
//         font-size: 18px;
//       }
//     }
//   }
// }

// 加载状态样式
.loading-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 120px;
  width: 100%;
}  
:deep(.van-badge--top-right){
  width: 57px;
  height: 32px;
  background: #FF5219;
  border-radius: 30px 30px 30px 30px;
 }